package com.h2n.framework.dto;

import java.util.Map;
import java.util.HashMap;

/**
 * Created by IntelliJ IDEA.
 * User: NhatNV
 * Date: Sep 23, 2009
 * Time: 10:40:09 PM
 * To change this template use File | Settings | File Templates.
 */
public class ModuleDTO {

  private int id;
  public void setId(int _id){
    this.id = _id;
  }
  public int getId(){
    return this.id;
  }

  private String module_Name;
  public void setModule_Name(String _moduleName){
    this.module_Name = _moduleName;
  }
  public String getModule_Name(){
    return this.module_Name;
  }

  private String description;
  public void setDescription(String _description){
    this.description = _description;
  }
  public String getDescription(){
    return this.description;
  }

  private String class_Path;
  public void setClass_Path(String _classPath){
    this.class_Path = _classPath;
  }
  public String getClass_Path(){
    return this.class_Path;
  }

  private int parent_Id;
  public void setParent_Id(int _parentId){
    this.parent_Id = _parentId;
  }
  public int getParent_Id(){
    return this.parent_Id;
  }

  private int type;
  public void setType(int _type){
    this.type = _type;
  }
  public int getType(){
    return this.type;
  }

  public enum Parameters{
    p_id,
    p_module_name,
    p_description,
    p_class_path,
    p_parent_id,
    p_type;
  }

  public Map getMap(){
    Map map = new HashMap();
    map.put(Parameters.p_id.toString(),this.id);
    map.put(Parameters.p_module_name.toString(),this.module_Name);
    map.put(Parameters.p_description.toString(),this.description);
    map.put(Parameters.p_class_path.toString(),this.class_Path);
    map.put(Parameters.p_parent_id.toString(),this.parent_Id);
    map.put(Parameters.p_type.toString(),this.type);

    return map;
  }

  public static final String INSERT_PROCEDURE = "modules_insert";
  public static final String UPDATE_PROCEDURE = "modules_update";
  public static final String DELETE_PROCEDURE = "modules_delete";
  public static final String GET_INFO_PROCEDURE = "modules_getinfo";
  public static final String GET_ALL_PROCEDURE = "modules_getall";
  public static final String GET_CHILD_BY_MEMBER_AND_PARENTID_PROCEDURE = "MODULES_GET_CHILD_BY_MEMPARID";
  public static final String GET_PARENT_BY_MEMBER_ID_PROCEDURE = "modules_get_parent_by_memberid";
}
